package com.ly.heart.domain;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.IdType;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.ly.common.core.domain.BaseVo;
import lombok.Data;
import com.ly.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * 财务模块-付款、收款、付款退款、收款退款，明细列对象 erp_king_finance_pay_receipt_detail_info
 *
 * @author wutao
 * @date 2024-07-12
 */
@TableName ( "erp_king_finance_pay_detail_info" )
@ApiModel ( value = "erp_king_finance_pay_receipt_detail_info对象", description = "财务模块-付款明细列" )
@Data
public class KingFinancePayDetailEntity extends BaseVo {
    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @TableId ( value = "id", type = IdType.INPUT )
    private String id;

    /**
     * 收付款单Id/收付款退款单Id
     */
    @ApiModelProperty ( "付款单Id" )
    @TableField ( "relation_id" )
    @Excel ( name = "收付款单Id/收付款退款单Id" )
    private String relationId;


    /**
     * 结算方式表Id
     */
    @ApiModelProperty ( "结算方式表编码" )
    @TableField ( "king_settlement_type_code" )
    @Excel ( name = "结算方式表Id" )
    private String kingSettlementTypeCode;

    /**
     * 收款用途
     */
    @ApiModelProperty ( "付款用途编码" )
    @TableField ( "pay_receipt_purpose_code" )
    @Excel ( name = "付款用途" )
    private String payReceiptPurposeCode;

    /**
     * 预付项目类型
     */
    @ApiModelProperty ( "预付项目类型，1：供应商；2：采购订单" )
    @TableField ( "prepaid_item_type" )
    @Excel ( name = "预付/预收项目类型" )
    private String prepaidItemType;


    @ApiModelProperty ( "采购/销售订单编码，送金蝶，当预付项目类型为采购订单时使用该字段" )
    @TableField ( "order_code" )
    @Excel ( name = "订单编码" )
    private String orderCode;

    @ApiModelProperty ( "采购/销售订单Id，送金蝶，送到采购订单或销售订单的付款/收款计划表中" )
    @TableField ( "order_id" )
    @Excel ( name = "订单ID" )
    private String orderId;

    /**
     * 应收/应付金额
     */
    @ApiModelProperty ( "应付金额" )
    @TableField ( "cope_money" )
    @Excel ( name = "应付金额" )
    private String copeMoney;

    /**
     * 实收金额=应收-现金折扣-手续费
     */
    @ApiModelProperty ( "实付金额=应付-折扣+手续费+长短款" )
    @TableField ( "actual_money" )
    @Excel ( name = "实付金额=应付-折扣+手续费+长短款" )
    private String actualMoney;

    /**
     * 现金折扣
     */
    @ApiModelProperty ( "现金折扣" )
    @TableField ( "cash_discount" )
    @Excel ( name = "现金折扣" )
    private String cashDiscount;

    /**
     * 手续费
     */
    @ApiModelProperty ( "手续费" )
    @TableField ( "handling_fees" )
    @Excel ( name = "手续费" )
    private String handlingFees;

    @ApiModelProperty ( "长短款" )
    @TableField ( "long_short_pay" )
    @Excel ( name = "长短款" )
    private String longShortPay;

    /**
     * 折后金额=应收-现金折扣
     */
    @ApiModelProperty ( "折后金额=应收-现金折扣" )
    @TableField ( "discounted_money" )
    @Excel ( name = "折后金额=应收-现金折扣" )
    private String discountedMoney;

    /**
     * 我方银行账号
     */
    @ApiModelProperty ( "我方银行账号，使用账号关联" )
    @TableField ( "bank_number" )
    @Excel ( name = "我方银行账号" )
    private String bankNumber;

    /**
     * 结算号
     */
    @ApiModelProperty ( "结算号" )
    @TableField ( "settlement_number" )
    @Excel ( name = "结算号" )
    private String settlementNumber;

    @ApiModelProperty ( "备注" )
    @TableField ( "remarks" )
    @Excel ( name = "备注" )
    private String remarks;

    /**
     * 交易时间
     */
    @ApiModelProperty ( "交易时间" )
    @TableField ( "transaction_time" )
    @JsonFormat ( pattern = "yyyy-MM-dd" )
    @Excel ( name = "交易时间", width = 30, dateFormat = "yyyy-MM-dd" )
    private Date transactionTime;


    /**
     * 费用项目编码
     */
    @ApiModelProperty ( "费用项目编码" )
    @TableField ( "fee_code" )
    @Excel ( name = "费用项目编码" )
    private String feeCode;

    /**
     * 费用承担部门
     */
    @ApiModelProperty ( "费用承担部门编码" )
    @TableField ( "fee_bear_dept_code" )
    @Excel ( name = "费用承担部门" )
    private String feeBearDeptCode;

    /**
     * 物料编码
     */
    @ApiModelProperty ( "物料编码" )
    @TableField ( "material_code" )
    @Excel ( name = "物料编码" )
    private String materialCode;

    /**
     * 含税单价
     */
    @ApiModelProperty ( "含税单价" )
    @TableField ( "tax_price" )
    @Excel ( name = "含税单价" )
    private String taxPrice;

    /**
     * 数量
     */
    @ApiModelProperty ( "数量" )
    @TableField ( "num" )
    @Excel ( name = "数量" )
    private String num;

    @ApiModelProperty ( "退款关联数量" )
    @TableField ( "refund_relation_num" )
    private String refundRelationNum;

    @ApiModelProperty ( "行号" )
    @TableField ( "line_number" )
    private String lineNumber;

    @ApiModelProperty ( "采购订单行号" )
    @TableField ( "order_line_number" )
    @Excel ( name = "采购订单行号" )
    private String orderLineNumber;

    @ApiModelProperty ( "税额" )
    @TableField ( "tax_rate" )
    @Excel ( name = "税额" )
    private String taxRate;

    @ApiModelProperty ( "银企开票" )
    @TableField ( "is_bank_enterprise_invoicing" )
    @Excel ( name = "银企开票" )
    private Boolean isBankEnterpriseInvoicing;

    @ApiModelProperty ( "关联金额" )
    @TableField ( "relation_amount" )
    @Excel ( name = "关联金额" )
    private String relationAmount;

    @ApiModelProperty ( "退款关联金额" )
    @TableField ( "refund_relation_amount" )
    @Excel ( name = "退款关联金额" )
    private String refundRelationAmount;

    @ApiModelProperty ( "源单类型;1:手动新增;2:应付票据下推付款单3:应付单下推付款单;4:其他应付单下推付款单;5、工程下推付款单" )
    @TableField ( "source_doc_type" )
    @Excel ( name = "源单类型;1:手动新增;2:应付票据下推付款单3:应付单下推付款单;4:其他应付单下推付款单;5、工程下推付款单" )
    private Integer sourceDocType;

    @ApiModelProperty ( "源单Id，是所选应付单的Id，非应付单明细Id" )
    @TableField ( "source_id" )
    @Excel ( name = "源单Id" )
    private String sourceId;

    @ApiModelProperty ( "源单单号" )
    @TableField ( "source_no" )
    @Excel ( name = "源单单号" )
    private String sourceNo;

    @ApiModelProperty ( "源单明细行Id，只有源单为其他应付单时，该字段有效" )
    @TableField ( "source_detail_id" )
    @Excel ( name = "源单明细行Id" )
    private String sourceDetailId;

//    @ApiModelProperty ("已核销金额")
//    @TableField ("verified_amount")
//    @Excel (name = "已核销金额")
//    private String verifiedAmount;

    /**
     * 创建者
     */
    @TableField ( "create_by" )
    private String createBy;

    /**
     * 创建时间
     */
    @TableField ( "create_time" )
    private Date createTime;

    /**
     * 更新者
     */
    @TableField ( "update_by" )
    private String updateBy;

    /**
     * 更新时间
     */
    @TableField ( "update_time" )
    private Date updateTime;

    /**
     * 是否可用
     */
    @ApiModelProperty ( "是否可用" )
    @TableField ( "is_used" )
    @Excel ( name = "是否可用" )
    private Integer isUsed;


    @ApiModelProperty ( "结算方式表名称" )
    @TableField ( exist = false )
    private String kingSettlementTypeName;

    @ApiModelProperty ( "付款用途名称" )
    @TableField ( exist = false )
    private String payReceiptPurposeName;

    @ApiModelProperty ( "费用承担部门名称" )
    @TableField ( exist = false )
    private String feeBearDeptName;

}
